Optimal. Leaf size=264 \[ -\frac {2 \sqrt [3]{b} \tan ^{-1}\left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a \sqrt {a^{2/3}-b^{2/3}} d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {2 \sqrt [3]{b} \tanh ^{-1}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 a \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} d}+\frac {2 \sqrt [3]{b} \tanh ^{-1}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 a \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 264, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3299, 3855,
2739, 632, 210, 212} \begin {gather*} -\frac {2 \sqrt [3]{b} \text {ArcTan}\left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a d \sqrt {a^{2/3}-b^{2/3}}}+\frac {2 \sqrt [3]{b} \tanh ^{-1}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}\right )}{3 a d \sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}+\frac {2 \sqrt [3]{b} \tanh ^{-1}\left (\frac {(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 a d \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 212
Rule 632
Rule 2739
Rule 3299
Rule 3855
Rubi steps
\begin {align*} \int \frac {\csc (c+d x)}{a+b \sin ^3(c+d x)} \, dx &=\int \left (\frac {\csc (c+d x)}{a}-\frac {b \sin ^2(c+d x)}{a \left (a+b \sin ^3(c+d x)\right )}\right ) \, dx\\ &=\frac {\int \csc (c+d x) \, dx}{a}-\frac {b \int \frac {\sin ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx}{a}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {b \int \left (\frac {1}{3 b^{2/3} \left (\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}+\frac {1}{3 b^{2/3} \left (-\sqrt [3]{-1} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}+\frac {1}{3 b^{2/3} \left ((-1)^{2/3} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}\right ) \, dx}{a}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {\sqrt [3]{b} \int \frac {1}{\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a}-\frac {\sqrt [3]{b} \int \frac {1}{-\sqrt [3]{-1} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a}-\frac {\sqrt [3]{b} \int \frac {1}{(-1)^{2/3} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {\left (2 \sqrt [3]{b}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}+2 \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a d}-\frac {\left (2 \sqrt [3]{b}\right ) \text {Subst}\left (\int \frac {1}{-\sqrt [3]{-1} \sqrt [3]{a}+2 \sqrt [3]{b} x-\sqrt [3]{-1} \sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a d}-\frac {\left (2 \sqrt [3]{b}\right ) \text {Subst}\left (\int \frac {1}{(-1)^{2/3} \sqrt [3]{a}+2 \sqrt [3]{b} x+(-1)^{2/3} \sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\left (4 \sqrt [3]{b}\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a d}+\frac {\left (4 \sqrt [3]{b}\right ) \text {Subst}\left (\int \frac {1}{-4 \left ((-1)^{2/3} a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}-2 \sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a d}+\frac {\left (4 \sqrt [3]{b}\right ) \text {Subst}\left (\int \frac {1}{4 \left (\sqrt [3]{-1} a^{2/3}+b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 (-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a d}\\ &=-\frac {2 \sqrt [3]{b} \tan ^{-1}\left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a \sqrt {a^{2/3}-b^{2/3}} d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {2 \sqrt [3]{b} \tanh ^{-1}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 a \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} d}+\frac {2 \sqrt [3]{b} \tanh ^{-1}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 a \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.16, size = 264, normalized size = 1.00 \begin {gather*} -\frac {6 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-6 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+i b \text {RootSum}\left [-i b+3 i b \text {$\#$1}^2+8 a \text {$\#$1}^3-3 i b \text {$\#$1}^4+i b \text {$\#$1}^6\&,\frac {2 \tan ^{-1}\left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )-4 \tan ^{-1}\left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2+2 i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2+2 \tan ^{-1}\left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^4-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^4}{b \text {$\#$1}-4 i a \text {$\#$1}^2-2 b \text {$\#$1}^3+b \text {$\#$1}^5}\&\right ]}{6 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.75, size = 96, normalized size = 0.36
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {4 b \left (\munderset {\textit {\_R} =\RootOf \left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}\right )}{3 a}}{d}\) | \(96\) |
default | \(\frac {\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {4 b \left (\munderset {\textit {\_R} =\RootOf \left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}\right )}{3 a}}{d}\) | \(96\) |
risch | \(2 i \left (\munderset {\textit {\_R} =\RootOf \left (\left (46656 a^{8} d^{6}-46656 b^{2} a^{6} d^{6}\right ) \textit {\_Z}^{6}-3888 b^{2} a^{4} d^{4} \textit {\_Z}^{4}-108 a^{2} b^{2} d^{2} \textit {\_Z}^{2}-b^{2}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\left (-\frac {7776 i a^{7} d^{5}}{b^{2}}+7776 i a^{5} d^{5}\right ) \textit {\_R}^{5}+\left (-\frac {1296 i a^{5} d^{4}}{b}+1296 i a^{3} b \,d^{4}\right ) \textit {\_R}^{4}+648 i a^{3} d^{3} \textit {\_R}^{3}+\left (\frac {36 i a^{3} d^{2}}{b}+72 i a b \,d^{2}\right ) \textit {\_R}^{2}+18 i a d \textit {\_R} +\frac {i b}{a}\right )\right )+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a d}\) | \(222\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 4.00, size = 29139, normalized size = 110.38 \begin {gather*} \text {too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc {\left (c + d x \right )}}{a + b \sin ^{3}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 15.66, size = 1439, normalized size = 5.45 \begin {gather*} \frac {\sum _{k=1}^6\ln \left (98304\,b^5+\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1048576-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^2\,a^2\,b^5\,98304+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^3\,a^3\,b^5\,5898240-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^4\,a^4\,b^5\,7962624-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^4\,a^6\,b^3\,663552-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^5\,a^5\,b^5\,5308416+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^5\,a^7\,b^3\,10616832+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^6\,a^6\,b^5\,7962624-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^6\,a^8\,b^3\,9953280-\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )\,a\,b^5\,589824-\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )\,a^2\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,24576-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^2\,a\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,3145728+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^2\,a^3\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,466944-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^3\,a^2\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,18874368-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^3\,a^4\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,3981312+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^4\,a^3\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,56623104+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^4\,a^5\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,20791296+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^5\,a^4\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,84934656-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^5\,a^6\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,78962688-{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^6\,a^5\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,254803968+{\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}^6\,a^7\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,252813312\right )\,\mathrm {root}\left (729\,a^6\,b^2\,z^6-729\,a^8\,z^6-243\,a^4\,b^2\,z^4+27\,a^2\,b^2\,z^2-b^2,z,k\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________